package ch10;

/**
 * Created by HaoChen on 2016/4/10.
 */

        import java.io.FileOutputStream;
        import java.io.IOException;
        import java.io.InputStream;
        import java.io.OutputStream;
        import java.net.URL;

public class StreamDownload {
    public static void main(String[] args) throws IOException {
        URL url = new URL(args[0]);
        InputStream src = url.openStream();
        OutputStream dest = new FileOutputStream(args[1]);
        StreamIO.dump(src, dest);
    }
}
